package com.example.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName("student_health")
@Schema(description = "学生健康状态实体")
public class StudentHealth extends BaseEntity {
    
    @Schema(description = "健康记录ID")
    private Long id;
    
    @Schema(description = "学生ID")
    @NotNull(message = "学生ID不能为空")
    private Long studentId;
    
    @Schema(description = "身高(cm)")
    private Double height;
    
    @Schema(description = "体重(kg)")
    private Double weight;
    
    @Schema(description = "BMI指数")
    private Double bmi;
    
    @Schema(description = "健康状况描述")
    private String healthStatus;
    
    @Schema(description = "饮食记录(菜品ID列表)")
    private String dietRecord;
    
    @Schema(description = "记录时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime recordTime;
    
    @Schema(description = "备注")
    private String remark;
    
    @Schema(description = "数据来源：1-学校体检，2-学生填写")
    private Integer source;
} 